// 用户基本不变的资料
const user = {
  info: {
    id:null,
    // token:1,//测试时使用，不用微信登录
    token:null,
    code:null,/*用来获取token的code*/
    bind:0,/*0:未绑定；1：绑定*/
    xiadanTYPE:null,/*下单的类型：纸类还是塑料类*/
    orderTYPE:null,/*订单的类型：个人下单还是企业下单*/
    getPrice:[],/*获取回收物品的价格*/
    swiperList:[],/*轮播图*/
    userInfo:{
      logo:'',
      name:'',
      phone:''
    }/*用户信息资料*/
  },
  methods: {
    id (state,id) {
      state.id = id
    },
    token (state, token){
      state.token = token
    },
    code (state, code){
      state.code = code
    },
    bind (state, bind){
      state.bind = bind
    },
    xiadanTYPE (state, type){
      state.xiadanTYPE = type
    },
    orderTYPE (state, type){
      state.orderTYPE = type
    },
    getPrice (state, price){
      state.getPrice = price
    },
    swiperList(state, list){
      state.swiperList = list
    },
    userInfo(state, obj){
      state.userInfo.logo = obj.logo
      state.userInfo.name = obj.name
      state.userInfo.phone = obj.phone
    }
  }
}

export default user
